import request from '@/utils/request'

// 查询主要客户列表
export function listDealMajorClient(query) {
  return request({
    url: '/majorClient/dealMajorClient/list',
    method: 'get',
    params: query
  })
}

// 查询主要客户详细
export function getDealMajorClient(id) {
  return request({
    url: '/majorClient/dealMajorClient/' + id,
    method: 'get'
  })
}

// 根据年份 和 companyId 获取当前年分下的所有客户
export function getByCompanyIdAndYear(companyId, year) {
  return request({
    url: '/majorClient/dealMajorClient/' + companyId + '/' + year,
    method: 'get'
  })
}

// 保存主要客户
export function saveDealMajorClient(data) {
  return request({
    url: '/majorClient/dealMajorClient/save',
    method: 'post',
    data: data
  })
}

// 删除主要客户
export function delDealMajorClient(id) {
  return request({
    url: '/majorClient/dealMajorClient/' + id,
    method: 'delete'
  })
}

// 导出主要客户
export function exportDealMajorClient(query) {
  return request({
    url: '/majorClient/dealMajorClient/export',
    method: 'get',
    params: query
  })
}
